<div class="row" style="margin-left: -20px;">
    <div class="span4">
        <label class="control-label-small" style="font-weight: bold;color: #000000">Rintra</label>
        <p></p>
    </div>
</div>
<div class="accordion-group">
    <input type="hidden">
    <div class="accordion-heading" style="color:#000000">
        <a class="accordion-toggle" style="padding: 0px 0px 0px 0px;">
            <!--data-parent="#accordion2"-->
            <div class="row" style="margin-left: -20px;">
                <div class="span4">
                    <label class="control-label-small" style="color:#000000">is-a</label>
                    <p class="controls-text-small" style="color:#000000">this <strong>is-a</strong> entity</p>
                </div>
                <div class="span1-compact" style="display:none;">
                    <span class="add-on remove-input" style="margin-left: 0px" ><i class="icon-edit" title="Edit"></i></span>
                </div>
            </div>
        </a>
    </div>
</div>
<div class="row" style="margin-left: -20px;">
    <div class="span4">
        <label class="control-label-small" style="font-weight: bold;color: #000000">Rinter</label>
        <p></p>
    </div>
</div>
<div class="accordion-group">
    <input type="hidden">
    <div class="accordion-heading" style="color:#000000">
        <a class="accordion-toggle" style="padding: 0px 0px 0px 0px;">
            <!--data-parent="#accordion2"-->
            <div class="row" style="margin-left: -20px;">
                <div class="span4">
                    <label class="control-label-small" style="color:#000000">deserve</label>
                    <p class="controls-text-small get-elem" style="color:#000000">this <strong>deserve</strong> <CITE>integrity</CITE></p>
                </div>
                <div class="span1-compact" style="display:none;">
                    <span class="add-on remove-input" style="margin-left: 0px" ><i class="icon-edit" title="Edit"></i></span>
                    <span class="add-on remove-input" style="margin-left: 0px" ><i class="icon-trash" title="Delete Attri"></i></span>
                </div>
            </div>
        </a>
    </div>
</div>

<script>
    $(function(){
        $(".get-elem").live('click',function(){
            var type = $(this).children("strong").text();
            var elem = $(this).children("CITE").text();
            elemTrigger(type,elem);
        })

        elemTrigger = function(type,elem){
            //测试使用
            var list = $("#testTree").find("input[type='hidden'].element");
            for(var i=0;i<list.length;i++){
                if($(list).eq(i).val()===elem){
                    var item = $(list).eq(i).parent();
                    $(item).children("div.element").trigger("click");
                    detailLoop(item);
                }
            }
        }

        detailLoop = function(item){
            if($(item).parent().parent().children("a").hasClass("plus")){
                $(item).parent().parent().children("a").trigger('click');
                detailLoop($(item).parent().parent());
            }
        }
    });
</script>